2ef51576f7fd4bfb67e0d2c771ff6b956cd83fcb,src/samTextViewer/Main.java,Main,main,#String[]#,31
Before Change
initGenomeList.add(genome);
gch.current().setGenome(initGenomeList);
TrackProcessor proc= new TrackProcessor(new TrackSet(inputFileList, gch.current()), gch);
if(proc.getGenomicCoordsHistory().current().getFastaFile() != null){
TrackSeqRegex re= new TrackSeqRegex(proc.getGenomicCoordsHistory().current());
proc.getTrackSet().add(re, "regex_seq_matches");;
}
proc.setNoFormat(opts.getBoolean("noFormat"));
// Put here the previous command so that it is re-issued if no imput is given
// You have to initialize this var outside the while loop that processes input files.
String currentCmdConcatInput= "";
if(!proc.isNoFormat()){
System.out.print("\033[48;5;231m");
}
// Batch processing file of regions
final String batchFile= opts.getString("batchFile");
if(! batchFile.isEmpty()){
if(! new File(batchFile).exists()){
System.err.print("\033[0m");
System.err.println("File " + batchFile + " does not exist.");
System.exit(1);
}
console.clearScreen();
console.flush();
BufferedReader br= new BufferedReader(new FileReader(new File(batchFile)));
String line = null;
while ((line = br.readLine()) != null){
// Start processing intervals one by one
IntervalFeature target= new IntervalFeature(line, TrackFormat.BED);
String reg= target.getChrom() + ":" + target.getFrom() + "-" + target.getTo();
String gotoAndExec= ("goto " + reg + " && " + exec).trim().replaceAll("&&$", "");
InteractiveInput itr = new InteractiveInput();
proc= itr.processInput(gotoAndExec, proc);
if (itr.getInteractiveInputExitCode() != 0){
System.err.println("Error processing '" + gotoAndExec + "' at line '" + line + "'");
System.exit(1);
}
}
br.close();
System.exit(0);
}
// See if we need to process the exec arg before going to interactive mode.
// Also if we are in non-interactive mode, we process the track set now and later exit
console.clearScreen();
console.flush();
proc.iterateTracks();
if(!exec.isEmpty() || opts.getBoolean("nonInteractive")){
InteractiveInput itr = new InteractiveInput();
proc= itr.processInput(exec, proc);
if(opts.getBoolean("nonInteractive")){
System.out.print("\033[0m");
System.exit(0);
After Change
initGenomeList.add(genome);
gch.current().setGenome(initGenomeList);
final TrackSet trackSet= new TrackSet(inputFileList, gch.current());
final TrackProcessor proc= new TrackProcessor(trackSet, gch);
if(proc.getGenomicCoordsHistory().current().getFastaFile() != null){
TrackSeqRegex re= new TrackSeqRegex(proc.getGenomicCoordsHistory().current());
proc.getTrackSet().add(re, "regex_seq_matches");;
}
proc.setNoFormat(opts.getBoolean("noFormat"));
// Put here the previous command so that it is re-issued if no imput is given
// You have to initialize this var outside the while loop that processes input files.
String currentCmdConcatInput= "";
if(!proc.isNoFormat()){
System.out.print("\033[48;5;231m");
}
// Batch processing file of regions
final String batchFile= opts.getString("batchFile");
if(! batchFile.isEmpty()){
if(! new File(batchFile).exists()){
System.err.print("\033[0m");
System.err.println("File " + batchFile + " does not exist.");
System.exit(1);
}
console.clearScreen();
console.flush();
BufferedReader br= new BufferedReader(new FileReader(new File(batchFile)));
String line = null;
while ((line = br.readLine()) != null){
// Start processing intervals one by one
IntervalFeature target= new IntervalFeature(line, TrackFormat.BED);
String reg= target.getChrom() + ":" + target.getFrom() + "-" + target.getTo();
String gotoAndExec= ("goto " + reg + " && " + exec).trim().replaceAll("&&$", "");
InteractiveInput itr = new InteractiveInput();
itr.processInput(gotoAndExec, proc);
if (itr.getInteractiveInputExitCode() != 0){
System.err.println("Error processing '" + gotoAndExec + "' at line '" + line + "'");
System.exit(1);
}
}
br.close();
System.exit(0);
}
// See if we need to process the exec arg before going to interactive mode.
// Also if we are in non-interactive mode, we process the track set now and later exit
console.clearScreen();
console.flush();
proc.iterateTracks();
if(!exec.isEmpty() || opts.getBoolean("nonInteractive")){
InteractiveInput itr = new InteractiveInput();
itr.processInput(exec, proc);
if(opts.getBoolean("nonInteractive")){
System.out.print("\033[0m");
System.exit(0);